package com.ruoyi.ai.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@TableName("ai_work_collect")
public class AiWorkCollect {

    @TableField("work_id")
    @NotNull(message = "作品不能为空")
    private Long workId;

    @TableField("user_id")
    @NotNull(message = "用户不能为空")
    private Long userId;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "create_date",fill = FieldFill.INSERT)
    @OrderBy(asc = false,sort = 1)
    private Date createDate;
}
